package cgs_portal

// 类型
type Type string

const (
	Visual   Type = "Visual" // 大屏
	ThreeD   Type = "ThreeD" // 3D
	TwoD     Type = "TwoD"   // 2D
	Earth    Type = "Earth"  //Globe
	Bim      Type = "Bim"    // Bim
	Workflow Type = "Workflow"
	App      Type = "App" // App
	Org      Type = "Org" // Org 组织
)

func HasProject(typ string) bool {
	tp := Type(typ)
	return tp == ThreeD || tp == TwoD || tp == Earth || tp == Bim
}

func ValidVisualType(typ string) bool {
	_, ok := VisualTypes[typ]
	return ok
}

var (
	VisualTypes = map[string]Type{
		"Visual":   Visual,
		"ThreeD":   ThreeD,
		"TwoD":     TwoD,
		"Earth":    Earth,
		"Bim":      Bim,
		"Workflow": Workflow,
		"App":      App,

		"Org": Org,
	}
	//portalTypes = [...]Type{Visual, ThreeD, TwoD}
)

type Result struct {
	code string
	msg  string
	data interface{}
}
